// index.js
// 获取应用实例
let app = getApp()
let yuming = app.globalData.yuming
import * as echarts from '../components/ec-canvass/echarts';
let chart = null
var staffNum = ''
let reg = app.globalData.mobile
const util = require('../components/util');
const request = require('../../config/request');
const utils = require('../../utils/util.js')
//获取像素比
const getPixelRatio = () => {
  let pixelRatio = 0
  wx.getSystemInfo({
    success: function (res) {
      pixelRatio = res.pixelRatio
    },
    fail: function () {
      pixelRatio = 0
    }
  })
  return pixelRatio
}
// console.log(pixelRatio)
let dpr = getPixelRatio();

function initChart(canvas, width, height, dpr) {
  //初始化图表
  chart = echarts.init(canvas, null, {
    width: width,
    height: height,
    devicePixelRatio: dpr
  });
  canvas.setChart(chart);
  var option = {
    legend: {
      data: ['扫码次数', '支出次数']
    },
    grid: {
      left: "0",
      containLabel: true
    },
    //当你选中数据时的提示框
    tooltip: {
      show: true,
      trigger: 'axis'
    },
    //	x轴
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: ['09/06', '09/05', '09/04', '09/03', '09/02', '09/01'],
      // x轴的字体样式
      axisLabel: {
        show: true,
        textStyle: {
          color: '#989898',
          fontSize: '14',
        },
        interval: 0,
      },
      // 控制网格线是否显示
      splitLine: {
        show: false,
        //  改变轴线颜色
        lineStyle: {
          // 使用深浅的间隔色
          color: ['#aaaaaa']
        }
      },
      // x轴的颜色和宽度
      axisLine: {
        lineStyle: {
          color: '#989898',
          width: 1, //这里是坐标轴的宽度,可以去掉
        }
      }
      // show: false //是否显示坐标
    },
    yAxis: {
      x: 'center',
      type: 'value',
      // x轴的字体样式
      axisLabel: {
        show: true,
        textStyle: {
          color: '#989898',
          fontSize: '14',
        }
      },
      axisLine: {
        lineStyle: {
          color: '#989898',
          width: 1, //这里是坐标轴的宽度,可以去掉
        }
      },
      //网格线
      splitLine: {
        lineStyle: {
          type: 'dashed'
        }
      },
      // show: false
    },
    series: [{
        name: '扫码次数',
        type: 'line',
        smooth: true,
        itemStyle: {
          color: "#ffa418"
        },
        data: [150, 3200, 3200, 316, 1785, 3770, 6650]
      },
      {
        name: '支出次数',
        type: 'line',
        smooth: true,
        itemStyle: {
          color: "#1bae18"
        },
        data: [200, 350, 6435, 460, 1300, 5700, 1300]
      }
    ]
  };
  /**绘制数据 */
  chart.setOption(option);
  return chart;
}

Page({
  ...request,
  data: {
    buttonClicked: false,
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 2000,
    duration: 1000,
    interval: 10000,
    heights: "",
    title: '',
    yuming: yuming,
    num: '',
    scanNum: 0,
    background: [],
    sonType: 0, //0默认  1子账号
    list2: [],
    tongzhi: [],
    ping: [],
    zheng: [],
    ec: {
      lazyLoad: true
    },
    ecs: {
      lazyLoad: true
    },
    jinghe_id: '',
    shopId: wx.getStorageSync('shopId'),
    zanfou: false,
    hangyeID: wx.getStorageSync('stryId'),
    mobile: '',
    get_code_btn: true,
    timer: '',
    count_down: '60', //验证秒数
    code: '', //验证码
    phone: '',
    wsdToken: '',
    power: '',
    createTime: '',
    isRefresh: true,
    wsddjs: '60', //获取温湿度秒数
    jgweidu: 0,
    grweidu: 0,
    likeNum: 0,
    yzshow: '',
    jiance_shebei_list: [], //温湿度列表
    gglist: [], //公告
    rking: '',
    topnewslist: [],
    zg_count: '',
    jb_count: '',
    shopStatus: 0, //0营业中，1注销，2暂停营业
    dianpuStatuslist: ['正常经营', '已注销', '暂停营业'],
    paiming: '',
    bg_noread:''
  },
  // tonewsdetail(e) {
  //   var newsid = e.currentTarget.dataset.newsid;
  //   wx.navigateTo({
  //     url: '/pages/newsdetail/newsdetail?newsid=' + newsid,
  //   })
  // },
  // 切换店铺状态  0营业中，-1注销，2暂停营业
  bindPickerChange: function (e) {
    var status = e.detail.value
    let that = this
    if (status == 1) {
      var topStart = -1
    } else {
      var topStart = status
    }
    this.myRequest(yuming + 'shop/shopSaveBossBg ', {
      shopId: wx.getStorageSync('shopId'),
      shopStatus: topStart,
    }, "POST").then(res => {
      if (res.data.code == 200) {
        wx.hideLoading();
        that.setData({
          shopStatus: status
        })
      }
    })

  },
  splitArr(data, senArrLen) {
    console.log(data)
    //处理成len个一组的数据
    let data_len = data.length;
    let arrOuter_len = data_len % senArrLen === 0 ? data_len / senArrLen : parseInt((data_len / senArrLen) + '') + 1;
    let arrSec_len = data_len > senArrLen ? senArrLen : data_len; //内层数组的长度
    let arrOuter = new Array(arrOuter_len); //最外层数组
    let arrOuter_index = 0; //外层数组的子元素下标
    // console.log(data_len % len);
    for (let i = 0; i < data_len; i++) {
      if (i % senArrLen === 0) {
        arrOuter_index++;
        let len = arrSec_len * arrOuter_index;
        //将内层数组的长度最小取决于数据长度对len取余，平时最内层由下面赋值决定
        arrOuter[arrOuter_index - 1] = new Array(data_len % senArrLen);
        if (arrOuter_index === arrOuter_len) //最后一组
          data_len % senArrLen === 0 ?
          len = data_len % senArrLen + senArrLen * arrOuter_index :
          len = data_len % senArrLen + senArrLen * (arrOuter_index - 1);
        let arrSec_index = 0; //第二层数组的索引
        for (let k = i; k < len; k++) { //第一层数组的开始取决于第二层数组长度*当前第一层的索引
          arrOuter[arrOuter_index - 1][arrSec_index] = data[k];
          arrSec_index++;
        }
      }
    }
    return arrOuter
  },
  // 截获竖向滑动
  catchTouchMove: function (res) {
    return false
  },
  gonggao(e) {
    // 1、从业人员 2、进销存 3、视频监控 4、承诺书5、投诉举报  6、监督检查7、监管码异常 8、驻店药师 9、阴凉柜
    console.log(e)
    var yj_type = e.currentTarget.dataset.yj_type
    var url = ''
    if (yj_type == 1) {
      url = '/page_one/xgdp/xgdp?title=经营信息&currtab=3'
    }
    if (yj_type == 2) {
      url = '/page_one/suyuan/suyuan?title=进销存'
    }
    if (yj_type == 3) {
      url = '/page_one/jiankong/jiankong?title=店铺视频设备'
    }
    if (yj_type == 4) {
      url = '/page_two/fangyi/fangyi?title=承诺书'
    }
    if (yj_type == 5) {
      url = '/page_two/tousu/tousu?title=被投诉'
    }
    if (yj_type == 6) {
      url = '/my_other/hfjg/hfjg?title=检查记录'
    }
    if (yj_type == 7) {
      url = '/page_other/dotaijgdj/dotaijgdj?title=监管等级'
    }
    if (yj_type == 8) {
      url = '/page_other/zdysqy/zdysqy?title=药师打卡&state=0'
    }
    if (yj_type == 9) {
      url = '/page_two/drugcc/drugcc?title=温湿度监测'
    }
    wx.navigateTo({
      url: url,
    })
  },
  gong_moter() {
    wx.navigateTo({
      url: '/wenshidu/gong_list/gong_list',
    })
  },
  fonlie() {
    this.myRequest(yuming + 'Jinghexincheng/jhxc_shop_rolling_list', {
      shopId: wx.getStorageSync('shopId'),
    }, "POST").then(res => {
      if (res.data.code == 200) {
        wx.hideLoading();
        var data = res.data.data;
        data.forEach((item, index) => {
          item.biao = index + 1
        })
        this.setData({
          gglist: data,
          topnewslist: this.splitArr(data, 4) //调用
        })
      }
    })
  },
  gojians(e) {
    wx.showLoading({
      title: '正在打开中',
    })
    let url = e.currentTarget.dataset.fil
    var that = this
    wx.downloadFile({
      url: url,
      success(res) {
        var filePath = res.tempFilePath
        console.log(url)
        wx.openDocument({
          filePath: filePath,
          fileType: that.data.type,
          success: function (res) {
            wx.hideLoading({
              success: (res) => {},
            })
          },
          fail(err) {
            wx.hideLoading({
              success: (res) => {},
            })
            wx.showToast({
              title: '不支持当前格式',
              icon: 'none'
            })
          }
        })
      },
      fail(err) {
        console.log(22)
        wx.hideLoading({
          success: (res) => {},
        })
        wx.showToast({
          title: '文件有误',
          icon: 'none'
        })
      }
    })

  },
  // 检测设备详情
  jiance_xq(e) {
    var id = e.currentTarget.dataset.id
    var item = e.currentTarget.dataset.item
    var isxiu = e.currentTarget.dataset.isxiu
    wx.setStorageSync('shebeixq', item)
    wx.navigateTo({
      url: '/page_two/addjiance/addjiance?title=修改设备&state=1&she_id=' + id + "&isxiu=" + isxiu,
    })
  },
  // 温湿度详情
  ws_xq(e) {
    var id = e.currentTarget.dataset.id
    var wenid = e.currentTarget.dataset.wenid
    var humid = e.currentTarget.dataset.humid


    var item = e.currentTarget.dataset.item
    var isxiu = e.currentTarget.dataset.isxiu
    wx.setStorageSync('shebeixq', item)
    console.log(humid)
    if (humid == '' || humid == null) {
      wx.showModal({
        title: '您还没有配置哦~',
        cancelText: '取消',
        confirmText: '前往',
        success: function (res) {
          if (res.confirm) {
            console.log("确定")
            wx.navigateTo({
              url: '/page_two/addjiance/addjiance?title=修改设备&state=1&she_id=' + id + "&isxiu=" + isxiu,
            })
          } else {

            console.log("取消")
          }
        }
      })
    } else {
      wx.navigateTo({
        url: '/wenshidu/wen_listxq/wen_listxq?she_id=' + id + "&wenid=" + wenid,
      })
    }

  },
  // 存储设备列表接口
  getccsbList() {
    // wx.showLoading({
    //   title: '加载中',
    //   icon: 'none'
    // })
    let that = this
    this.myRequest(yuming + 'Yiyao/yiyaoDeviceList', {
      shopId: wx.getStorageSync('shopId'),
      page: 1,
      keywords: ''
    }, "POST").then(res => {
      if (res.data.code == 200) {
        wx.hideLoading();
        var data = res.data.data;
        data.forEach(item => {
          if (item.humidity.length != 0) {
            item.humidity.detail.time = this.formatDate(new Date(item.humidity.detail.time))
          }
        })
        this.setData({
          jiance_shebei_list: data
        })
      }
    })
  },
  // 温湿度mobile 
  mobile(e) {
    this.setData({
      mobile: e.detail.value
    })
  },
  // 温湿度列表
  wen_lie() {
    wx.navigateTo({
      url: '/wenshidu/wen_list/wen_list',
    })
  },
  // 温湿度验证码
  code(e) {
    this.setData({
      code: e.detail.value
    })
  },
  // 温湿度点击获取验证码
  huoqu() {
    var that = this
    if (that.data.mobile == '') {
      wx.showToast({
        title: '请输入手机号',
        icon: 'none'
      })
    } else if (that.data.mobile != '') {
      if (reg.test(that.data.mobile) == false) {
        wx.showToast({
          title: '请输入正确的手机号',
          icon: "none"
        })
      } else {
        that.yzm()
      }
    }
  },
  // 温湿度获取验证码接口
  yzm() {
    var that = this
    wx.request({
      url: 'https://sensor.jaalee.com/v1/login/code',
      method: 'GET',
      data: {
        account: that.data.mobile,
      },
      success: function (res) {
        wx.showToast({
          title: res.data.message,
          icon: 'none'
        })
        that.setData({
          get_code_btn: false
        })
        that.get_code_settime()
      },
      fail: function () {
        console.log("请求数据失败");
      }
    })
  },
  // 温湿度登录倒计时
  get_code_settime: function (that) {
    var that = this;
    var countDown = that.data.count_down; //获取倒计时初始值
    //如果定时器设置在外边，那么用户就看不到countDown的数值变化，所以要把定时器存进data里边
    that.setData({
      //这里把setInterval复制给变量名timer
      timer: setInterval(function () {
        countDown--;
        that.setData({
          get_code_btn: false, //此处用于隐藏验证码点击按钮，使倒计时显示
          count_down: countDown //倒计时计数 
        })
        //当计数为0时，清空定时器，使验证码按钮再次显示
        if (countDown == 0) {
          clearInterval(that.data.timer); //此处我清除timer之后，count_down没有变回我原先设定的120，get_code_btn也没有变回默认的true，咱没搞明白，所以我又重新赋值了
          that.setData({
            get_code_btn: true,
            count_down: '60'
          })
        }
      }, 1000)
    })
  },
  // 温湿度登录验证
  queren() {
    if (this.data.mobile == '') {
      wx.showToast({
        title: '请输入手机号',
        icon: 'none'
      })
    } else if (this.data.mobile != '') {
      if (reg.test(this.data.mobile) == false) {
        wx.showToast({
          title: '请输入正确的手机号',
          icon: "none"
        })
      } else {
        if (this.data.code == '') {
          wx.showToast({
            title: '请输入验证码',
            icon: 'none'
          })
        } else {
          this.logins()
        }
      }
    } else if (this.data.code == '') {
      wx.showToast({
        title: '请输入验证码',
        icon: 'none'
      })
    } else if (this.data.code.length != 4) {
      wx.showToast({
        title: '请输入正确的验证码',
        icon: 'none'
      })
    } else {
      this.logins()
    }
  },
  // 温湿度登录接口
  logins() {
    var that = this
    wx.request({
      url: 'https://sensor.jaalee.com/v1/login',
      method: 'POST',
      data: {
        account: that.data.mobile,
        code: that.data.code,
      },
      success: function (res) {
        wx.showToast({
          title: res.data.message,
          icon: 'none'
        })
        if (res.data.code == 0) {
          that.setData({
            wsdToken: res.data.data.token
          })
          wx.setStorageSync('wsdToken', res.data.data.token)
        }
      },
      fail: function () {
        console.log("请求数据失败");
      }
    })
  },
  // 温湿度调取信息接口
  getWsd() {
    var that = this
    wx.request({
      url: 'https://sensor.jaalee.com/v1/open/data',
      method: 'GET',
      header: {
        Authorization: that.data.wsdToken
      },
      data: {
        bleMac: 'C86E5EB87F3D',
        page: 0,
        size: 1
      },
      success: function (res) {
        if (res.data.code == 0) {
          console.log(res)
          console.log(res.data)
          that.setData({
            wsdData: res.data.data.list[0],
            power: res.data.data.power,
            bleMac: res.data.data.mac,
            createTime: utils.formatTime(new Date(res.data.data.list[0].createTime))
          })
        }
      },
      fail: function () {
        console.log("请求数据失败");
      }
    })
  },
  // 温湿度刷新倒计时
  get_wsd_settime: function (that) {
    var that = this;
    that.setData({
      isRefresh: false, //此处用于隐藏验证码点击按钮，使倒计时显示
    })
    var countDown = that.data.wsddjs; //获取倒计时初始值
    //如果定时器设置在外边，那么用户就看不到countDown的数值变化，所以要把定时器存进data里边
    that.setData({
      //这里把setInterval复制给变量名timer
      timers: setInterval(function () {
        countDown--;
        that.setData({
          wsddjs: countDown //倒计时计数 
        })
        //当计数为0时，清空定时器，使验证码按钮再次显示
        if (countDown == 0) {
          clearInterval(that.data.timers); //此处我清除timer之后，count_down没有变回我原先设定的120，get_code_btn也没有变回默认的true，咱没搞明白，所以我又重新赋值了
          that.setData({
            isRefresh: true,
            wsddjs: '60'
          })
        }
      }, 1000)
    })
  },
  // 温湿度刷新
  update() {
    if (this.data.isRefresh == true) {
      this.get_wsd_settime();
      this.getWsd();
    } else {
      wx.showToast({
        title: `请${this.data.wsddjs}秒后再次尝试刷新`,
        icon: 'none'
      })
    }
  },
  // 经营信息
  xijing() {
    wx.navigateTo({
      url: '/page_one/xgdp/xgdp',
    })
  },
  backxqsss(e) {
    var url = e.currentTarget.dataset.url
    // console.log(url)
    if (url != '') {
      wx.navigateTo({
        url: url,
      })
    }
  },
  // 详情
  zcfgxq(e) {
    console.log(11)
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/page_other/zhengcfgxqs/zhengcfgxqs?id=' + id,
    })
  },
  getBanner() {
    wx.showLoading({
      title: '加载中',
      icon: 'none'
    })
    wx.request({
      url: 'https://msion.86wky.com/Besall/public_banner',
      data: {
        alias: 'qs_home',
        shopId: wx.getStorageSync('shopId')
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        wx.hideLoading();
        if (res.data.code == 200) {
          this.setData({
            background: res.data.data
          })
        }
        console.log(this.data.background);
      },
    })
  },
  // 最新通知详情
  zxtzxq(e) {
    var id = e.currentTarget.dataset.id;
    var from = e.currentTarget.dataset.from;
    console.log(from)
    let curr = 0;
    if (from == '监管消息') {
      curr = 1;
    }
    wx.navigateTo({
      url: '/page_one/jianguanxq/jianguanxq?id=' + id + "&curr=" + curr + "&title=" + from + "详情",
    })
  },
  // 关注
  yiguan(e) {
    var id = e.currentTarget.dataset.id
    var that = this
    wx.request({
      url: 'https://msion.86wky.com/shop/shopAddBossfollow',
      data: {
        shopId: wx.getStorageSync('shopId'),
        fid: id
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        that.wenz()
      },
    })
  },
  // 两个分类
  // 溯源
  suyuan() {
    wx.navigateTo({
      // url: '/page_one/suyuan/suyuan?title=溯源追踪',
      // url: '/page_two/fangyi/fangyi?title=防疫上报',
      url: '/my_other/hfjg/hfjg'
    })
  },
  yaoshi() {
    // wx.showToast({
    //   title: '暂未开通',
    //   icon: 'none'
    // })
    wx.navigateTo({
      url: '/page_other/zdysqy/zdysqy?title=药师打卡&state=0',
    })
  },
  // 分类
  fenlei0() {
    wx.navigateTo({
      // url: '/page_two/study/study?title=公示牌',
      url: '/page_one/jiankong/jiankong?title=明厨亮灶设备',
    })
  },
  // 分类
  fenlei1() {
    wx.navigateTo({
      // url: '/page_two/study/study?title=公示牌',
      url: '/page_one/jiankong/jiankong?title=店铺视频设备',
    })
  },
  // 监管分数排名
  fenshupai() {
    wx.navigateTo({
      url: '/wenshidu/yao_shph/yao_shph?title=监管分数排名',
    })
  },
  // 上传处方
  chufang() {
    wx.navigateTo({
      url: '/wenshidu/chufang_lsit/chufang_lsit?title=上传处方',
    })
  },
  // 数据
  shuju() {
    wx.request({
      url: 'https://msion.86wky.com/Besall/findShopInfos',
      data: {
        shopId: wx.getStorageSync('shopId')
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        // if (res.data.data != null) {
        let touxiang = '';
        if (res.data.data.shopLogo == null) {
          touxiang = '../../images/mrtx.png'
        } else {
          touxiang = res.data.data.shopLogo
        }
        // 判断商铺当前的经营状态 shopStatus  0营业中，1注销，2暂停营业
        var shopStatus = res.data.data.shopStatus

        this.setData({
          grxx: res.data.data,
          mobile: res.data.data.mobile,
          shopType: res.data.data.shopType,
          avatar: res.data.httpUrl + touxiang,
          shopStatus: shopStatus
        })


        wx.setStorageSync('shopname', res.data.data.shopName)
        if (res.data.data.label_all != '') {
          var label_all = res.data.data.label_all;
          var qitaval = []
          var qita = []
          label_all.forEach(item => {
            qitaval.push(item.trade_title)
            qita.push(item.id)
          })
          wx.setStorageSync('qitaval', qitaval)
          wx.setStorageSync('qita', qita)
        } else {
          wx.setStorageSync('qitaval', '')
          wx.setStorageSync('qita', '')
        }
        this.setData({
          jinghe_id: res.data.data.regulatorOffice
        })
        wx.setStorageSync('jinghe_id', res.data.data.regulatorOffice) //regulatorOffice = 176  泾河新城
        wx.setStorageSync('shopType', res.data.data.shopType)
        wx.setStorageSync('mobile', res.data.data.mobile)
        if (!res.data.data.stryId_fid) {
          wx.setStorageSync('stryId', res.data.data.stryId)
        } else {
          wx.setStorageSync('stryId', res.data.data.stryId_fid)
        }
        this.setData({
          hangyeID: wx.getStorageSync('stryId')
        })
        // } else {
        //     wx.reLaunch({
        //         url: '/page_zhu/login/login',
        //     })
        // }
      },
    })
  },
  // 栏目列表
  lmlist() {
    wx.request({
      url: 'https://msion.86wky.com/Shopthat/shop_column_menu',
      data: {
        total: 1,
        shopId: wx.getStorageSync('shopId'),
        sonType: this.data.sonType,
        sonId: wx.getStorageSync('subId'), //子账号id,
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        console.log(wx.getStorageSync('shopId'));
        if(wx.getStorageSync('shopId') ==''){
          this.setData({
            list2: [{
              "id": 279,
              "fid": 0,
              "cid": 20,
              "colName": "经营资质",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b288cd91332.png",
              "JumpUrl": "/page_one/xgdp/xgdp?title=经营资质",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 280,
              "fid": 0,
              "cid": 20,
              "colName": "从业人员",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b288ee768fe.png",
              "JumpUrl": "/page_one/congye/congye?title=从业人员",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 282,
              "fid": 0,
              "cid": 20,
              "colName": "明厨亮灶",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b2892abdd37.png",
              "JumpUrl": "/page_one/jiankong/jiankong?title=明厨亮灶设备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 283,
              "fid": 0,
              "cid": 20,
              "colName": "溯源追踪",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b28942c3d85.png",
              "JumpUrl": "/page_one/suyuan/suyuan?title=溯源追踪",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 284,
              "fid": 0,
              "cid": 20,
              "colName": "洗涤消毒",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b2895dc14f3.png",
              "JumpUrl": "/page_two/publics/publics?title=洗涤消毒",
              "colExplain": "<p style=\"line-height: 24px;\"><span style=\"font-family: 微软雅黑; font-size: 16px;\">一、食具的洗涤消毒所有的食具、茶具经消毒后，方可使用。</span></p>\n<p style=\"line-height: 24px;\"><span style=\"font-family: 微软雅黑; font-size: 16px;\">1、热力消毒(程序:除残渣&rarr;热碱水浸泡洗刷&rarr;清水冲&rarr;热力消毒)(1)煮沸消毒:将洗涤好的餐具放入100℃的水中煮沸10分钟。(2)蒸汽消毒:将洗涤好的餐具放入蒸汽柜内，温度保持100℃;消毒时间不得少于15分钟。(3)红外线消毒:将洗涤好的餐具放入消毒柜;温度保持100℃，消毒时间不得少于15分钟。</span></p>\n<p style=\"line-height: 24px;\"><span style=\"font-family: 微软雅黑; font-size: 16px;\">2、药物消毒(对不宜蒸、煮消毒的餐具、茶杯、酒杯可在洗净后用化学药物消毒。程序:除残渣&rarr;热碱水浸泡洗刷一药物消毒一清水冲)(1)使用的洗涤剂、消毒剂应当对人体安全、无害，必须是经省级以上卫生行政部门批准生产的产品。(2)消毒液浓度、消毒时间必须严格按消毒液的使用说明进行。</span></p>\n<p style=\"line-height: 24px;\"><span style=\"font-family: 微软雅黑; font-size: 16px;\">二、食具的保管经消毒的食(饮)具应有专门的存放柜，存放整齐避免与其他杂物混放，防止食具重复污染，并对存放柜定期进行清洗消毒。</span></p>",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 285,
              "fid": 0,
              "cid": 20,
              "colName": "废弃油脂",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b2897b9fa0b.png",
              "JumpUrl": "/page_two/publics/publics?title=废弃油脂",
              "colExplain": "<p class=\"MsoNormal\"><span style=\"font-family: Calibri; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">为履行好食品安全第一责任人的法定义务，防止</span><span style=\"font-family: Calibri;\">&ldquo;</span><span style=\"font-family: 宋体;\">地沟油</span><span style=\"font-family: Calibri;\">&rdquo;</span><span style=\"font-family: 宋体;\">流入食品生产经营和使用环节，保障人民群众食品安全和身体健康，各餐饮服务单位应建立以下制度</span><span style=\"font-family: Calibri;\">:</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">一、餐饮废弃物和废弃油脂应设专人负责管理。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">二、餐饮废弃物和废弃油脂应有专门标有</span><span style=\"font-family: 宋体;\">&ldquo;餐饮废弃物和废弃油脂&rdquo;字样的密闭容器存放，集中处理。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">三、餐饮废弃物和废弃油脂只能销售给资质餐厨废弃物和废弃油脂加工单位，做到生产日清，不得销售给其他单位或个人。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">四、处理餐厨废弃物和废弃油脂要建立档案详细记录销售时间、种类、数量、收购单位、用途、联系人姓名、电话、地址、收货人签字等，并详细保存。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">五、不得随便处理餐厨废弃物和废弃油脂。</span></span></p>",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 286,
              "fid": 0,
              "cid": 20,
              "colName": "食材质检",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b2898fc0057.png",
              "JumpUrl": "/page_two/publics/publics?title=食材质检",
              "colExplain": "<p class=\"MsoNormal\"><span style=\"font-family: Calibri; font-size: 10.5pt;\">1<span style=\"font-family: 宋体;\">、食品中的细菌：</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">食品中的细菌：致病菌、相对致病菌、非致病菌三类。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">1</span><span style=\"font-family: 宋体;\">）致病菌对人体的损害主要是细菌产生的毒素。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">2</span><span style=\"font-family: 宋体;\">）相对致病菌是指在通常身体条件下并不致病，当条件转变时，特别是当机体抵抗力下降时，就可能致病。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">3</span><span style=\"font-family: 宋体;\">）非致病菌，一般来说对人不引起疾病，但与食品腐败变质有密切关系，而且又是评价食品卫生质量的重要指标。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">2</span><span style=\"font-family: 宋体;\">、食品中细菌污染的途径，主要有以下几个方面：</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">1</span><span style=\"font-family: 宋体;\">）原料污染：食品原料在采集、加工前已被细菌污染。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">2</span><span style=\"font-family: 宋体;\">）产、储、运、销过程中的污染：这是细菌污染机会最多的一些环节。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">3</span><span style=\"font-family: 宋体;\">）从业人员的污染</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">（</span><span style=\"font-family: Calibri;\">4</span><span style=\"font-family: 宋体;\">）烹调加工过程中的污染。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">3</span><span style=\"font-family: 宋体;\">、霉菌与霉菌毒素对食品的污染？</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">霉菌种类繁多，目前已被描述过的有十万种之多，有很多霉菌对人类是有益的，但有些霉菌对人类有害，有一部分丝状体比较发达的霉菌在引起农作物病害或食品霉坏变质的同时，还能产生有毒的代谢产物，称为霉菌毒素。在我国危害最大的霉菌毒素有黄曲霉毒素、镰刀菌毒素、</span><span style=\"font-family: Calibri;\">3-</span><span style=\"font-family: 宋体;\">硝基丙酸、杂色曲霉毒素、展青霉毒素等。因此，必须做好防霉去毒工作。</span></span></p>",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 288,
              "fid": 0,
              "cid": 20,
              "colName": "添加剂管理",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b289ccb3564.png",
              "JumpUrl": "/page_two/publics/publics?title=添加剂管理",
              "colExplain": "<p class=\"MsoNormal\"><span style=\"font-family: Calibri; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">食品添加剂必须严格按照《食品安全法》和《餐饮业食品卫生管理办法》的规定使用。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">1</span><span style=\"font-family: 宋体;\">、禁止采购使用违返《食品安全法》规定的食品添加剂。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">2</span><span style=\"font-family: 宋体;\">、餐饮服务必须对食品添加剂实行专人采购、专人保管、专人领用、专人登记、专柜保存的管理制度。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">3</span><span style=\"font-family: 宋体;\">、采购食品添加剂必须索取供应商有效合法的《食品生产许可证》或《食品流通许可证》、《营业执照》复印件，产品检验报告等合格证明。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">4</span><span style=\"font-family: 宋体;\">、使用的食品添加剂必须有包装标识和产品说明书，查验添加剂包装是否完整，标识内容包括</span><span style=\"font-family: Calibri;\">:</span><span style=\"font-family: 宋体;\">品名、产地、厂名、卫生许可证号、规格、配方或者主要成分、生产日期、批号或者代号、保质期限、使用范围与使用量、使用方法、质量标准等，并在标识上明确标示食品添加剂&rdquo;字样。采购进口食品添加剂应有中文标签或说明书，必须索取进口检验合格证明。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">5</span><span style=\"font-family: 宋体;\">、食品添加剂的使用必须符合《食品添加剂使用卫生标准》规定的品种及其使用范围、使用量。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">6</span><span style=\"font-family: 宋体;\">、配备有食品添加剂专用称量工具，严格按照使用量使用。不得用手或容器随意添加。添加剂使用完毕，及时将添加剂放入密闭容器中包装防止吸潮变质。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">7</span><span style=\"font-family: 宋体;\">、采购和使用食品添加剂应建立台帐，如实查验和记录食品添加剂的名称、规格、数</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: 宋体;\">量、生产日期</span><span style=\"font-family: Calibri;\">(</span><span style=\"font-family: 宋体;\">批号</span><span style=\"font-family: Calibri;\">)</span><span style=\"font-family: 宋体;\">、保质期、供货者名称及联系方式、进货日期等内容。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">8</span><span style=\"font-family: 宋体;\">、不得使用未经批准、受污染或变质以及超过保质期限的食品添加剂。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">9</span><span style=\"font-family: 宋体;\">、存放食品添加剂，必须做到专柜、专架，定位存放，不得与非食用产品或有毒有害物品混放。</span></span></p>\n<p class=\"MsoNormal\"><span style=\"font-family: 宋体; font-size: 10.5pt;\"><span style=\"font-family: Calibri;\">10</span><span style=\"font-family: 宋体;\">、每次使用须有食品添加剂使用记录，做好台帐并予以保存两年。</span></span></p>",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 289,
              "fid": 0,
              "cid": 20,
              "colName": "公示牌",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b289e1ee704.png",
              "JumpUrl": "/page_two/study/study?title=公示牌",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 291,
              "fid": 0,
              "cid": 20,
              "colName": "被投诉",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b28a175cc53.png",
              "JumpUrl": "/page_two/tousu/tousu?title=被投诉",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 293,
              "fid": 0,
              "cid": 20,
              "colName": "曝光台",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-22/62b28a47ef6fb.png",
              "JumpUrl": "/my_other/bgt/bgt?title=曝光台",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 368,
              "fid": 0,
              "cid": 20,
              "colName": "承诺书",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/foodcns/foodcns?title=承诺书",
              "colExplain": "",
              "isShow": 0,
              "solt": 52,
              "createtime": null,
              "updatetime": null,
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "配置须知",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_one/pzxz/pzxz?title=配置须知",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "灭虫管理",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/publics/publics?title=灭虫管理",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },{
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "电梯维保",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/dtwb/dtwb?title=电梯维保",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "气瓶气站",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/qipqiz/qipqiz?title=气瓶气站",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "维保记录",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/qpqzaddweib/qpqzaddweib?title=维保记录",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "消防设备",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/xfsb/xfsb?title=消防设备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "维保记录2",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/yladdweib/yladdweib?title=维保记录2",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "区域广场",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/bossquan/bossquan?title=区域广场",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "四实登记",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/sisdj/sisdj?title=四实登记",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "电梯报备",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/xfsb/xfsb?title=电梯报备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "消毒设备",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/xiaodsb/xiaodsb?title=消毒设备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "防疫上报",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/fangyi/fangyi?title=防疫上报",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "监管提醒",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_one/jianguan/jianguan?title=监管提醒",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "储存设备",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/chucsb/chucsb?title=储存设备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "销售登记",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/saledj/saledj?title=销售登记",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "日常抽检",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/dailycj/dailycj?title=日常抽检",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "收费标准",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/shoufbz/shoufbz?title=收费标准",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "索记索票",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/suojsp/suojsp?title=索记索票",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "服务内容",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/fwnr/fwnr?title=服务内容及标准",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "市场商户",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/scsh/scsh?title=市场商户",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "意见箱",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/yjx/yjx?title=意见箱",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "被投诉",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/tousu/tousu?title=被投诉",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "设备报备",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/shebdj/shebdj?title=设备报备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "设备维保",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/youlsb/youlsb?title=设备维保",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "设备登记",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/yladdsheb/yladdsheb?title=设备登记",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "驻店药师",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_other/zdysqy/zdysqy?title=驻店药师",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "上传处方",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/wenshidu/chufang_lsit/chufang_lsit?title=上传处方",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "五类药品",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/xiaosxx/xiaosxx?title=五类药品",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "药政学习",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_other/zhengcfgxq/zhengcfgxq?title=药政学习",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
            ,
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "重点药品",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/txdrug/txdrug?title=特药报备",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "计量监管",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/jiljg/jiljg?title=计量监管",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            },
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "气瓶气站",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/qipqiz/qipqiz?title=气瓶气站",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
            ,
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "培训记录",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/wenshidu/peixin_list/peixin_list?title=培训记录",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
            ,
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "温湿度监测",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/drugcc/drugcc?title=温湿度监测",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
            ,
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "投诉举报",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/page_two/tousu/tousu?title=投诉举报",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
            ,
            {
              "id": 465,
              "fid": 0,
              "cid": 1,
              "colName": "政策法规",
              "colLogo": "https://msion.86wky.com/upload/images/2022-06-24/62b555a91ff8f.png",
              "JumpUrl": "/wenshidu/yaozhenglist/yaozhenglist?title=投诉举报",
              "colExplain": "",
              "isShow": 0,
              "solt": 0,
              "createtime": "2023-03-31 13:59:23",
              "updatetime": "2023-03-31 14:22:20",
              "delete_time": null
            }
          ],
          })
        }
        else{
          this.setData({
            list2: res.data.data
          })
        }

      },
    })
  },
  // 切换店铺
  qiehuan() {
    wx.navigateTo({
      url: '/page_zhu/xzdp/xzdp?mobile=' + this.data.mobile,
    })
  },
  // 放大
  fangda(e) {
    var img = e.currentTarget.dataset.img
    var list = e.currentTarget.dataset.list
    var arr = []
    for (let i in list) {
      arr.push(list[i]); //属性
    }
    wx.previewImage({
      current: img,
      urls: arr
    })
  },
  // 医药模块配置须知页跳转
  pzxz() {
    wx.navigateTo({
      url: '/page_one/pzxz/pzxz?title=配置须知',
    })
  },
  // 监管提醒更多
  mores() {
    // wx.navigateTo({
    //   url: '/page_one/jianguan/jianguan?title=监管提醒',
    // })
    wx.switchTab({
      url: '/pages/xiaoxi/xiaoxi',
    })
  },
  // 区域社区更多
  qumore() {
    wx.navigateTo({
      url: '/page_two/bossquan/bossquan?title=区域社群',
    })
  },
  // 栏目详情
  xqs(e) {
    util.buttonClicked(this)
    var url = e.currentTarget.dataset.url
    var index = e.currentTarget.dataset.index
    if (url == '') {
      wx.showToast({
        title: `获得${this.data.likeNum}个赞呦~`,
        icon: 'none'
      })
    }
    // sss
    if (url == "/pages/xiaoxi/xiaoxi") {
      wx.switchTab({
        url: url,
      })
    }
    if (wx.getStorageSync('stryId') == 6) {
      // if (index != 2) {
      wx.navigateTo({
        url: url,
      })
      // } else {
      // wx.showToast({
      // title: '暂未开通',
      // icon: 'none'
      // })
      // }
    } else {
      if (index != 3) {
        wx.navigateTo({
          url: url,
        })
      } else {
        wx.switchTab({
          url: url,
        })
      }
    }
  },
  // 扫码次数
  smcs() {
    wx.navigateTo({
      url: '/page_other/saomnum/saomnum',
    })
  },
  // 动态监管等级
  dtjgdj() {
    wx.navigateTo({
      url: '/page_other/dotaijgdj/dotaijgdj',
    })
  },
  // 收款码
  kuan() {
    // wx.showToast({
    //   title: '暂未开通',
    //   icon:'none'
    // })
    wx.navigateTo({
      url: '/page_other/shoukuan/shoukuan',
    })
  },
  list_xiang(e) {
    util.buttonClicked(this)
    var id = e.currentTarget.dataset.id + 1
    var cid = e.currentTarget.dataset.cid
    if (this.data.jinghe_id == 176) {
      var url = e.currentTarget.dataset.url
    } else {
      var url = e.currentTarget.dataset.url + "&cid=" + cid + "&id=" + id
    }
    console.log(url);
    var index = e.currentTarget.dataset.index
    var a = url.slice(0, 6)
    console.log(a)
    if (a == '/pages') {
      wx.switchTab({
        url: url
      })
    } else {
      wx.navigateTo({
        url: url
      })
    }
  },
  // 点赞
  dianzan(e) {
    var id = e.currentTarget.dataset.id
    var iszan = e.currentTarget.dataset.iszan
    var index = e.currentTarget.dataset.index
    var that = this
    wx.request({
      url: 'https://msion.86wky.com/shop/shopPubBossCircle',
      data: {
        shopId: wx.getStorageSync('shopId'),
        id: id
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        if (res.data.code == 200) {
          this.wenz();
        } else {
          wx.showToast({
            title: res.data.msg,
            icon: 'none'
          })
        }
      },
    })
  },
  // boss详情
  bossxq(e) {
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/page_two/bossxq/bossxq?id=' + id,
    })
  },
  // 文章、boss圈
  wenz() {
    var jinghe_id = wx.getStorageSync('jinghe_id')
    var url = ''
    if (jinghe_id == 176) {
      url = 'Jinghexincheng/shopHome'
    } else {
      // url = 'Shopthat/shop_notice_list'
      url = 'Besall/shopHome'

    }
    if (wx.getStorageSync('shopId')) {
      this.myRequest(yuming + url, {
        shopId: wx.getStorageSync('shopId'),
        page:1
      }, "POST").then(res => {
        // for (var i = 0; i < res.data.shopResult.length; i++) {
        //   res.data.shopResult[i].isshow = false
        // }
        this.num = res.data.ranking 
        console.log(this.num);
        this.setData({
          zheng: res.data.ArticleResult,
          // ping: res.data.shopResult,
          shopCount: res.data.shopCount,
          // tongzhi: res.data.Reminder,
        })
       
        this.setData({
          ping: res.data.shopResult,
        })
        if (this.data.ping.length != 0) {
          this.data.ping.forEach(item => {
            if (item.shopLogo == null) {
              item.shopLogo = '../../images/mrtx.png'
            }
          })
        }

        var data = res.data.homeData
        var that = this;
        if (wx.getStorageSync('stryId') == 6) {
          that.setData({
            list: [
              // {
              //   name: '检查记录',
              //   num: data.patPublicity,
              //   url: '/my_other/hfjg/hfjg?title=检查记录'
              // },
              // /page_one/suyuan/suyuan?title=进销存
              // {
              //     name: '抽检公示',
              //     num: data.bossCircle,
              //     // url: '/page_two/bossquan/bossquan?title=区域社群'
              //     url: '/page_other/choujian/choujian?title=抽检公示'
              // },
              // {
              //   name: '执业药师',
              //   num: data.yaoshi_total,
              //   // url: '/page_two/bossquan/bossquan?title=区域社群'
              //   url: '/page_other/zdysqy/zdysqy?title=执业药师&state=1'
              // },
              {
                name: '被投诉',
                num: data.beComplaint,
                url: '/page_two/tousu/tousu?title=被投诉'
              },
              {
                name: '监管分数排名',
                num: res.data.ranking,
                url: '/wenshidu/yao_shph/yao_shph?title=监管分数排名'
              },
              // {
              //   name: '曝光台',
              //   num: data.bg_total,
              //   url: '/my_other/bgt/bgt?title=曝光台'
              // }
            ],
            likeNum: data.likeNum
          })
        } else {
          that.setData({
            list: [
              // {
              //   name: '从业人员',
              //   num: data.staffNum,
              //   url: '/page_one/congye/congye?title=从业人员'
              // },
              // {
              //   name: '溯源追踪',
              //   num: data.traceability,
              //   url: '/page_one/suyuan/suyuan?title=溯源追踪'
              // },
              // {
              //   name: '防疫上报',
              //   num: data.eppReport,
              //   url: '/page_two/fangyi/fangyi?title=防疫上报'
              // },
              // {
              //   name: '监管提醒',
              //   num: data.regReminder,
              //   url: '/pages/xiaoxi/xiaoxi'
              // },
              // {
              //   name: '检查公示',
              //   num: data.patPublicity,
              //   url: '/my_other/hfjg/hfjg?title=检查公示'
              // },
              // {
              //   name: '知识产权',
              //   num: data.intProperty,
              //   url: '/page_one/xgdp/xgdp?title=经营信息&currtab=2'
              // },
              {
                name: '监管通知',
                num: data.regReminder,
                url: '/pages/xiaoxi/xiaoxi'
              },
              {
                name: '被投诉',
                num: data.beComplaint,
                url: '/page_two/tousu/tousu?title=被投诉'
              },
              {
                name: '被评论',
                num: data.beEvaluate,
                url: '/page_two/beievlute/beievlute?title=被评论'
              },
              {
                name: '被点赞',
                num: data.likeNum,
                url: ''
              },
              // {
              //   name: '抽检公示',
              //   num: data.bossCircle,
              //   // url: '/page_two/bossquan/bossquan?title=区域社群'
              //   url: '/page_other/choujian/choujian?title=抽检公示'
              // },
            ],
            likeNum: data.likeNum
          })
        }
      })
    } else {
      wx.showModal({
        title: '您还没登录呦~',
        cancelText: '取消',
        confirmText: '前往',
        success: function (res) {
          if (res.confirm) {
            console.log("确定")
            wx.reLaunch({
              url: '/page_zhu/login/login',
            })
          } else {
            wx.reLaunch({
              url: '/page_zhu/login/login',
            })
            console.log("取消")
          }
        }
      })
    }

    // wx.request({
    //     url: 'https://msion.86wky.com/Besall/shopHome',
    //     data: {
    //         shopId: wx.getStorageSync('shopId')
    //     },
    //     header: {
    //         'Content-Type': 'application/x-www-form-urlencoded',
    //         Token: wx.getStorageSync('token'),
    //     },
    //     method: 'post',
    //     success: (res) => {
    //         for (var i = 0; i < res.data.shopResult.length; i++) {
    //             res.data.shopResult[i].isshow = false
    //         }
    //         this.setData({
    //             zheng: res.data.ArticleResult,
    //             ping: res.data.shopResult,
    //             shopCount: res.data.shopCount,
    //             tongzhi: res.data.Reminder,
    //         })
    //         this.data.ping.forEach(item => {
    //             if (item.shopLogo == null) {
    //                 item.shopLogo = '../../images/mrtx.png'
    //             }
    //         })
    //         this.setData({
    //             ping: this.data.ping
    //         })
    //         var data = res.data.homeData
    //         var that = this;
    //         if (wx.getStorageSync('stryId') == 6) {
    //             that.setData({
    //                 list: [{
    //                         name: '',
    //                         num: data.patPublicity,
    //                         url: '/my_other/hfjg/hfjg?title=检查公示'
    //                     },
    //                     // {
    //                     //     name: '抽检公示',
    //                     //     num: data.bossCircle,
    //                     //     // url: '/page_two/bossquan/bossquan?title=区域社群'
    //                     //     url: '/page_other/choujian/choujian?title=抽检公示'
    //                     // },
    //                     {
    //                         name: '执业药师',
    //                         num: data.yaoshi_total,
    //                         // url: '/page_two/bossquan/bossquan?title=区域社群'
    //                         url: '/page_other/zdysqy/zdysqy?title=执业药师'
    //                     },
    //                     {
    //                         name: '被投诉',
    //                         num: data.beComplaint,
    //                         url: '/page_two/tousu/tousu?title=被投诉'
    //                     },
    //                     {
    //                         name: '曝光台',
    //                         num: data.bg_total,
    //                         url: '/my_other/bgt/bgt?title=曝光台'
    //                     }
    //                 ],
    //                 likeNum: data.likeNum
    //             })
    //         } else {
    //             that.setData({
    //                 list: [{
    //                         name: '从业人员',
    //                         num: data.staffNum,
    //                         url: '/page_one/congye/congye?title=从业人员'
    //                     },
    //                     {
    //                         name: '溯源追踪',
    //                         num: data.traceability,
    //                         url: '/page_one/suyuan/suyuan?title=溯源追踪'
    //                     },
    //                     {
    //                         name: '防疫上报',
    //                         num: data.eppReport,
    //                         url: '/page_two/fangyi/fangyi?title=防疫上报'
    //                     },
    //                     {
    //                         name: '监管提醒',
    //                         num: data.regReminder,
    //                         url: '/pages/xiaoxi/xiaoxi'
    //                     },
    //                     {
    //                         name: '检查公示',
    //                         num: data.patPublicity,
    //                         url: '/my_other/hfjg/hfjg?title=检查公示'
    //                     },
    //                     {
    //                         name: '知识产权',
    //                         num: data.intProperty,
    //                         url: '/page_one/xgdp/xgdp?title=经营信息&currtab=2'
    //                     },
    //                     {
    //                         name: '被投诉',
    //                         num: data.beComplaint,
    //                         url: '/page_two/tousu/tousu?title=被投诉'
    //                     },
    //                     {
    //                         name: '被评论',
    //                         num: data.beEvaluate,
    //                         url: '/page_two/beievlute/beievlute?title=被评论'
    //                     },
    //                     {
    //                         name: '被点赞',
    //                         num: data.likeNum,
    //                         url: ''
    //                     },
    //                     {
    //                         name: '抽检公示',
    //                         num: data.bossCircle,
    //                         // url: '/page_two/bossquan/bossquan?title=区域社群'
    //                         url: '/page_other/choujian/choujian?title=抽检公示'
    //                     },
    //                 ],
    //                 likeNum: data.likeNum
    //             })
    //         }
    //     },
    // })
    
  },


  tongzhiAsvd(){
    this.myRequest(yuming + 'Shopthat/shop_notice_list',{
      shopId: wx.getStorageSync('shopId'),
      page:1 
    },"POST").then(res=>{
      this.setData({
        tongzhi:res.data.data.slice(0,3)
      })
    })
  },
  // 政策法规详情
  zhengxq() {
    wx.navigateTo({
      url: '/page_other/zhengcfgxq/zhengcfgxq',
      // url: '/wenshidu/yaozhenglist/yaozhenglist',
    })
  },
  xq(e) {
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      // url: '/wenshidu/yaozhengxq/yaozhengxq?id=' + id,
      url: '/page_other/zhengcfgxqs/zhengcfgxqs?id=' + id,
    })
  },
  // 数字转文字
  changeNumber(num, point) { //num是传进来的具体数字，point是我们要保留的小数点个数
    var that = this
    let number = num.toString().split('.')[0] //第一步通过转换成字符串，利用.分割截取.前面的数字
    if (number.length < 6) { //对于万以下的数字我们不处理
      console.log(number)
      that.setData({
        num: number
      })
      return number //直接返回
    } else if (number.length >= 6 && number.length <= 8) { //第二步判断！小于6直接抬走，6-8即十百千万留下
      let demical = number.substring(number.length - 4, number.length - 4 + point) //这一步呢是拿到需要的小数
      let realnumber = parseFloat(parseInt(number / 10000) + '.' + demical) + '万' /*这一步呢是将原本的数除于10000再将之取int拿到小数点前的数，直接加万也行，加上拿到的小数也行！*/
      console.log(realnumber)
      that.setData({
        num: realnumber
      })
      return realnumber
    } else if (number.length > 8) { //这个是处理上亿的数了
      let demical = number.substring(number.length - 8, number.length - 8 + point)
      let realnumber = parseFloat(parseInt(number / 100000000) + '.' + demical) + '亿'
      console.log(realnumber)
      that.setData({
        num: realnumber
      })
      return realnumber
    }
  },
  yanzheng() {
    wx.showModal({
      title: '需要授权哦~',
      cancelText: '取消',
      confirmText: '确定',
      success: function (res) {
        if (res.confirm) {
          console.log("确定")
          wx.redirectTo({
            url: '/page_zhu/shou/shou?sta=0&url=pages/index/index',
          })
        } else {
          wx.navigateBack({
            delta: 0,
          })
          console.log("取消")
        }
      }
    })
  },
  getsmjlList() {
    wx.showLoading({
      title: '加载中',
      icon: 'none'
    })
    let that = this;
    //  shop_scan_month 扫码次数
    // shop_pay_scan_month  扫码支付次数
    wx.request({
      url: 'https://msion.86wky.com/shop/shop_scan_month',
      data: {
        shopId: wx.getStorageSync('shopId'),
        Year: 2023
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        wx.hideLoading();
        let smlist = res.data.data.reverse();
        let cishu = [];
        let month = [];
        smlist.forEach(item => {
          cishu.push(item.pay_num);
          month.push(item.month)
        })
        // cishu = cishu.reverse();
        // month = month.reverse();
        this.setData({
          cishu,
          month
        })
        this.oneComponent.init((canvas, width, height) => {
          const chart = echarts.init(canvas, null, {
            width: width,
            height: height,
            devicePixelRatio: dpr // 加上这一行即可解决模糊问题
          });
          let option = {
            color: '#37A2FF',
            tooltip: {
              trigger: 'axis',
              axisPointer: {
                type: 'cross',
                label: {
                  backgroundColor: '#6a7985'
                }
              }
            },
            legend: {
              data: ['扫码次数']
            },
            grid: {
              left: '3%',
              right: '4%',
              bottom: '3%',
              containLabel: true
            },
            xAxis: [{
              type: 'category',
              boundaryGap: false,
              data: this.data.month
            }],
            yAxis: [{
              type: 'value'
            }],
            series: [{
              name: '扫码次数',
              type: 'line',
              stack: 'Total',
              smooth: true,
              lineStyle: {
                width: 0
              },
              showSymbol: false,
              label: {
                show: true,
                position: 'top'
              },
              areaStyle: {
                opacity: 0.8,
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgb(255, 191, 0)'
                  },
                  {
                    offset: 1,
                    color: 'rgb(255, 0, 135)'
                  }
                ])
              },
              emphasis: {
                focus: 'series'
              },
              data: this.data.cishu
            }]
          };
          this.setOption(chart, option);
          //this.chart = chart;
          return chart;
        });
      },
      fail: (error) => {
        reject(error);
      }
    })
  },
  gettsInfo() {
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: 'https://msion.86wky.com/shop/shop_class_options',
      data: {
        shopId: wx.getStorageSync('shopId')
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        wx.hideLoading();
        let tsxx = [];
        res.data.data.forEach(item => {
          tsxx.push({
            value: item.option_total,
            name: item.name
          });
        })
        this.setData({
          tsxx
        })
        this.twoComponent.init((canvas, width, height) => {
          const chart = echarts.init(canvas, null, {
            width: width,
            height: height,
            devicePixelRatio: dpr // 加上这一行即可解决模糊问题
          });
          let option = {
            tooltip: {
              trigger: 'item',
              position: 'top',
            },
            legend: {
              orient: 'horizontal',
            },
            series: [{
              roseType: 'area',
              type: 'pie',
              radius: '55%',
              center: ["49%", "60%"],
              data: this.data.tsxx,
              emphasis: {
                itemStyle: {
                  shadowBlur: 10,
                  shadowOffsetX: 0,
                  shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
              },
              itemStyle: {

                normal: {
                  borderWidth: 2,
                  borderColor: '#FFF',
                  labelLine: {
                    length: -12,
                  },
                  color: function (colors) {
                    var colorList = [
                      '#3aa1fe',
                      '#37cbcb',
                      '#4fcb73',
                      '#fbd437',
                      '#f3637c',
                      '#a97be8',
                    ];
                    return colorList[colors.dataIndex];
                  }
                },
              }
            }]
          }
          this.setOption(chart, option);
          //this.chart = chart;
          return chart;
        });
      },
    })
  },
  setOption: function (chart, option) {
    var option = option;
    chart.setOption(option);
  },
  getCishu() {
    wx.request({
      url: 'https://msion.86wky.com/shop/scan_shop_total',
      data: {
        shopId: wx.getStorageSync('shopId'),
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        wx.setStorageSync('totalnum', res.data.data.scan_num)
        this.setData({
          scanNum: res.data.data.scan_num,
          rking: res.data.data.rking
        })
      },
    })
  },
  onLoad() {
    var shopId = wx.getStorageSync('shopId')
    if (!shopId) {
      wx.reLaunch({
        url: '/page_zhu/login/login',
      })
    } else {

      if (wx.getStorageSync('token') != '') {
        console.log(11111111111)

        if (wx.getStorageSync('stryId') == 6) {
          if (wx.getStorageSync('wsdToken') != '') {
            this.setData({
              wsdToken: wx.getStorageSync('wsdToken')
            })
            this.get_wsd_settime();
            this.getWsd();
          }
        } else {
          this.getsmjlList();
          this.gettsInfo();
          this.oneComponent = this.selectComponent('#mychart-dom-bar');
          this.twoComponent = this.selectComponent('#mychart-dom-bar1');
        }

        this.setData({
          heights: wx.getMenuButtonBoundingClientRect().top + 5,
          sonType: wx.getStorageSync('sonType')
        })
      } else if (wx.getStorageSync('stryId') != 6) {
        console.log(1111111)
        this.getsmjlList();
        this.gettsInfo();
        this.oneComponent = this.selectComponent('#mychart-dom-bar');
        this.twoComponent = this.selectComponent('#mychart-dom-bar1');
      }

      // else {
      //   wx.reLaunch({
      //     url: '/page_zhu/login/login',
      //   })
      // }

    }

    this.getBanner();
    this.fonlie()
    this.hongdian();
    if(wx.getStorageSync('jinghe_id') != 176){
      this.tongzhiAsvd()
    }


    wx.hideTabBar()
  },
  // 红点
  hongdian() {
    var that = this
    wx.request({
      url: 'https://msion.86wky.com/besall/messageHongdian',
      data: {
        shopId: wx.getStorageSync('shopId'),
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Token: wx.getStorageSync('token'),
      },
      method: 'post',
      success: (res) => {
        var that = this
        var data = res.data.data
        that.setData({
          jgweidu: data.jg_count,
          grweidu: data.gr_count,
          zg_count: data.zg_count,
          jb_count: data.jb_count,
          bg_noread:data.bg_noread
        })
      },
    })
  },
  onShow() {
    this.setData({
      shopId: wx.getStorageSync('shopId')
    })
    var shopId = wx.getStorageSync('shopId')
    if (shopId) {
      this.getccsbList()
      this.shuju();
      this.wenz();
      this.hongdian();


      this.getCishu();
      this.lmlist()
      if (wx.getStorageSync('stryId') == 6) {
        this.getWsd();
      }
    }
    this.hongdian();

  },
  formatTen: function (num) {
    return num > 9 ? (num + "") : ("0" + num);
  },
  formatDate: function (date) {
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    return year + "-" + this.formatTen(month) + "-" + this.formatTen(day);
  },
})